//加载公共样式
require('../../assets/css/index.less')


let dom =require('../../utils/dom')
const request = require('../../utils/request')

//字体图标
require('../../assets/fonts/iconfont.css')
//加载自己的样式
require('./run.less')

window.onload = () => {
    //底部
    dom.Bmenu('run')
    dom.Tmenu('run')

    //地图
    var map = new BMapGL.Map('map-container'); // 创建Map实例
    map.centerAndZoom(new BMapGL.Point(104.06452, 30.54196), 20); // 初始化地图,设置中心点坐标和地图级别
    map.enableScrollWheelZoom(true); // 开启鼠标滚轮缩放

    //倒计时
    document.querySelector('#GoBtn').addEventListener('click',function(){
        document.querySelector('.background').style.display='block'
        timeOut()
    })

    function timeOut(){
        let num =3
        let timeID=window.setInterval(function(){
            let text = num--
            document.querySelector('#countDown').textContent=text
            if(text==0){
                window.clearInterval(timeID)
                document.querySelector('#countDown').textContent='GO'
                location.href='./motioning.html'
            }
        },1000)
    }
}